package main

import "fmt"

func main() {
	var a [3]int
	a[0] = 1
	a[1] = 2
	a[2] = 3
	fmt.Printf("%T %v\n", a, a)

	fmt.Println("-----------------------------------------------")
	var b = [4]int{1, 2, 3, 4}
	fmt.Println(b)

	fmt.Println("-----------------------------------------------")
	var strArr [5]string
	fmt.Println(strArr)

	var c = [...]int{1, 23, 4, 3, 4, 3}
	fmt.Println(c)
	c[0] = 100
	fmt.Println(c)

	fmt.Println("-----------------------------------------------")
	var d = [...]int{1: 1, 2: 2, 5: 3, 4: 4}
	fmt.Println(d, len(d))
	fmt.Println("-----------------------------------------------")
	for i := 0; i < len(d); i++ {
		fmt.Println(d[i])
	}
	fmt.Println("-----------------------------------------------")
	for key, val := range d {
		fmt.Println(key, val)
	}
}
